import request from '@/utils/request'
// 获取部门信息
export function getDepartments(){
    return request({
        url: '/company/department',
        
      })
}
// 新增部门
export function addDepartments(data){
  return request({
      url: '/company/department',
      method:'post',
      data
      
    })
}

// 获取部门id信息
export function getDepartmentDetail(id){
  return request({
      url: `/company/department/${id}`,
      
    })
}


// 修改部门id信息
export function updateDepartmentDetail(data){
  return request({
      url: `/company/department/${data.id}`,
      method:'put',
      data
    })
}

// 删除
export function delDepartmentDetail(id){
  return request({
      url: `/company/department/${id}`,
      method:'delete',
    })
}